home *** CD-ROM | disk | FTP | other *** search
- MODULE ShowIDs;
- __IMP_SWITCHES__
- #ifdef HM2
- #ifdef __LONG_WHOLE__
- (*$!i+: Modul muss mit $i- uebersetzt werden! *)
- (*$!w+: Modul muss mit $w- uebersetzt werden! *)
- #else
- (*$!i-: Modul muss mit $i+ uebersetzt werden! *)
- (*$!w-: Modul muss mit $w+ uebersetzt werden! *)
- #endif
- #endif
- (* 31-Mai-93, hk *)
- VAL_INTRINSIC
-
- FROM proc IMPORT getpid, getppid, getpgrp, getuid, geteuid, getgid, getegid;
- FROM InOut IMPORT WriteInt, WriteString, WriteLn, Read;
-
- VAR ch : CHAR;
-
- BEGIN
- WriteString(" parent process id: "); WriteInt(INT(getppid()), 0); WriteLn;
- WriteString(" own process id: "); WriteInt(INT(getpid()), 0); WriteLn;
- WriteString(" process group id: "); WriteInt(INT(getpgrp()), 0); WriteLn;
- WriteString(" real user id: "); WriteInt(INT(getuid()), 0); WriteLn;
- WriteString(" real group id: "); WriteInt(INT(getgid()), 0); WriteLn;
- WriteString(" effective user id: "); WriteInt(INT(geteuid()), 0); WriteLn;
- WriteString("effective group id: "); WriteInt(INT(getegid()), 0); WriteLn;
-
- Read(ch);
- END ShowIDs.
-